package com.kgcx.organization.domain;

import com.kgcx.common.annotation.dict.Dict;
import com.kgcx.common.annotation.securety.Sensitive;
import com.kgcx.dbutils.annotation.SelectLike;
import com.kgcx.dbutils.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Table;
import javax.persistence.Transient;

@Data
@EqualsAndHashCode(callSuper = false)
@Table(name = "t_organization_customer")
@ApiModel(value = "乘客")
public class Customer extends BaseDomain {

    public static final String GENDER_UNKNOWN = "0";
    public static final String GENDER_MALE = "1";
    public static final String GENDER_FEMALE = "2";

    public static final String SMS_VALIDATE_LOGIN_KEY_PREFIX = "SMS_VALIDATE_CODE.LOGIN.";

    /**
     * 名字
     */
    @ApiModelProperty(value = "名字", required = true, example = "卢本伟")
    @SelectLike
    private String name;
    /**
     * 密码
     */
    @ApiModelProperty(value = "密码", required = true, example = "")
    @Sensitive(hide = true, hideEndIndex = -1)
    private String password;
    /**
     * 头像图片id
     */
    @ApiModelProperty(value = "头像图片id", required = true, example = "649c38917ae84d5a9ab0ec97a4649328")
    private String headImg;
    /**
     * 电话
     */
    @ApiModelProperty(value = "电话", required = true, example = "13887877767")
    @SelectLike
    @Sensitive(isEncrypt = true)
    private String phone;
    /**
     * 性别，0=未知，1=男，2=女，9=未说明,字典：gender
     */
    @ApiModelProperty(value = "性别，0=未知，1=男，2=女，9=未说明,字典：gender", required = true, example = "1")
    private String gender;
    /**
     * 微信id
     */
    @ApiModelProperty(value = "微信id", required = true, example = "649c38917ae84d5a9ab0ec97a4649328")
    private String wxId;
    /**
     * 来源：1=ios,2=android,3=小程序
     */
    @ApiModelProperty(value = "来源：1=ios,2=android,3=小程序", required = true, example = "1")
    private Integer source;

    /**
     * 注册mac地址
     */
    @ApiModelProperty(value = "注册mac地址", required = false, example = "112312321323")
    private String mac;
    /**
     * 注册imei地址
     */
    @ApiModelProperty(value = "注册imei地址", required = false, example = "112312321323")
    private String imei;
    /**
     * 注册imsi地址
     */
    @ApiModelProperty(value = "注册imsi地址", required = false, example = "112312321323")
    private String imsi;
    /**
     * 注册port地址
     */
    @ApiModelProperty(value = "注册port地址", required = false, example = "127.0.0.1")
    private String ip;
    /**
     * 注册端口号
     */
    @ApiModelProperty(value = "注册端口号", required = false, example = "80")
    private String port;

    /**
     * 登录lat
     */
    @ApiModelProperty(value = "lat", required = false, example = "80")
    @Transient
    private String lat;

    /**
     * 登录lng
     */
    @ApiModelProperty(value = "lng", required = false, example = "80")
    @Transient
    private String lng;

    /**
     * 性别，0=未知，1=男，2=女，9=未说明,字典：gender
     */
    @ApiModelProperty(value = "性别，0=未知，1=男，2=女，9=未说明,字典：gender", readOnly = true, example = "男")
    @Dict(type = "gender", fieldName = "gender")
    @Transient
    private String genderValue;


}